import axios from '@/request'
import { queryParams } from '@/utils'

export function getAgentStratisticsApi() {
  return axios.get('/admin/agent/statistics')
}

export function getAgentListApi(page, query = {}) {
  let r = queryParams(query)
  return axios.get(`/admin/agent/${page}${r}`)
}

export function getAgentOrderListApi(page, query = {}) {
  let r = queryParams(query)
  return axios.get(`/admin/user_bill/${page}${r}`)
}

export function getConfigApi() {
  return axios.get("/admin/distribution_setting/get");
}

export function setConfigApi(data) {
  return axios.post(`/admin/distribution_setting/set`, data);
}
